<template>
    <div>
        <x-header v-show="!isWeChar">
            <div slot="default" class="common__header--title">{{activity.activityName}}</div>
            <div @click="goBack" slot="overwrite-left"><img slot="icon" src="~assets/x3/ico/goback1.png" class="go-back"></div>
        </x-header>
        <div class="activity__ad">
            <div v-html="activity.activityDiv"></div>
        </div>
        <!-- <u-edit v-model="activity.activityDiv"></u-edit> -->
    </div>
</template>

<script>
// import "vue-quill-editor";
// import uEdit from "src/common/editor/Quilleditor";
import { mapState } from 'vuex';
import { Loading, TransferDomDirective as TransferDom, XHeader } from 'vux';
import { Mutations, RouteUrl } from 'src/common/const';
export default {
    computed: mapState([
        'popState',
        'isLoading',
        'footerShow',
        'region',
        'activity',
        "isWeChar"
    ]),
    components: {
        XHeader,
        // uEdit
    },
    beforeRouteEnter(to, from, next) {
        next();
    },
    beforeRouteEnter(to, from, next) {
        sessionStorage["ACTIVITY_FORM_URL"] = from.path;
        next();
    },
    beforeMount() {
        if (sessionStorage["ACTIVITY_FORM_URL"] == "/") {
            this.$common.goUrl(this, RouteUrl.INDEX);
        }
    },
    methods: {
        goBack() {
            this.$common.goBack(this);
        },
    },
    mounted() {
        document.title = this.activity.activityName;
        this.$init.subPageInit(this);

    }
}
</script>

<style lang="scss">
.home__views--view {
  height: 100%;
  width: 100%;
}

.home__views {
  // margin-bottom: 53px;
  width: 100%;
  height: 100%;
}

.activity__ad {
  // text-indent: 2em;
  font-size: 10px;
  padding: 10px; // height: 100vh;
  background: #fff;
  word-wrap: break-word;
  border-top: 1px solid #e7e7e7;
  img {
    width: 100%;
  }
}

.ql-align-center {
  strong {
    text-indent: 0em;
    text-align: center;
    display: block;
  }
}
</style>
